// 独立的路由方便维护
const Login = () => import('../components/Login.vue')
const Home = () => import('../components/Home.vue')
const Welcome = () => import('../components/Welcome.vue')
const Users = () => import('../components/user/Users.vue')
const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/home',
    name: Home,
    component: Home,
    redirect: '/welcome',
    children: [
      {
        path: '/welcome',
        name: Welcome,
        component: Welcome
      },
      {
        path: '/users',
        name: Users,
        component: Users
      }
    ]
  }
]

export default routes
